<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<link href="css/adminstyle.css" rel="stylesheet" type="text/css">
<title>管理区域</title>
</head>

<body>
<div id="man_zone">
  <form  method="post" action="<? if  (empty($id)){ echo  'function_subAdd.html'; }else{ echo  'function_subUpdate.html'; }  ?>" >
    <input name="id" type="hidden" value="<?=$id?>">

  <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
    <tr>
      <td class="left_title_1">标示</td>
      <td colspan="3"><input name="mark" type="text"  value="<?=getStr($extract_vars,'mark')?>"></td>
      </tr>
       <tr>
          <td class="left_title_1">controller</td>
          <td><input name="controller" type="text"  value="<?=getStr($extract_vars,'controller')?>" /></td>
          <td  align="right" class="left_title_1"><span class="left_title_1">function</span></td>
          <td><input name="function" type="text"  value="<?=getStr($extract_vars,'function')?>" /></td>
      </tr>
        <tr>
          <td class="left_title_1">是否在栏目显示</td>
          <td ><input name="display" type="checkbox" value="1" <? if (getStr($extract_vars,'display')==1){ ?>  checked="checked" <? } ?> /></td>
          <td class="left_title_1" >所属父栏目</td>
          <td><select name="father_id" size="12"  id="select">
            <option value="0"  <?
         if (getStr($extract_vars,'father_id')==0){
		 	echo "selected";
		 }
		 ?>  >根栏目</option>
            <?
        function  classInfo ($data,$leve=0,$tmp,$father_id)
		{
			if (!empty($data))
			{
				if ($leve>0)
				{
					$tmp="&nbsp;&nbsp;".$tmp;
				}
				$leve++;
				
				foreach ($data as $v)
				{
					?>
            <option value="<?=$v['id']?>"   <?
 
		 if ($father_id == $v['id']){
		 	echo "selected";
		 }
		?>   ><? echo $tmp."|-".$v['mark']; ?></option>
            <?
                    classInfo($v['next'],$leve,$tmp,$father_id);
				}
			}
		}
		classInfo($functions,0,"",getStr($extract_vars,'father_id'));
		?>
          </select></td>
      </tr>

    <tr>
      <td colspan="4" align="center" >
        <input name="" type="submit" value="提交" />
        <input name="input" type="button" class="PublicBot" value="返回" onclick="window.history.go(-1);" /></td>
      </tr>
  </table>
</form>
</div>

</body>
</html>
